.class Lcom/estrongs/android/taskmanager/c;
.super Landroid/content/BroadcastReceiver;


# instance fields
.field final synthetic a:Lcom/estrongs/android/taskmanager/b;


# direct methods
.method constructor <init>(Lcom/estrongs/android/taskmanager/b;)V
    .locals 0

    iput-object p1, p0, Lcom/estrongs/android/taskmanager/c;->a:Lcom/estrongs/android/taskmanager/b;

    invoke-direct {p0}, Landroid/content/BroadcastReceiver;-><init>()V

    return-void
.end method


# virtual methods
.method public onReceive(Landroid/content/Context;Landroid/content/Intent;)V
    .locals 8

    const v3, 0x7f070036

    const/4 v7, 0x1

    const/4 v6, 0x0

    invoke-virtual {p2}, Landroid/content/Intent;->getAction()Ljava/lang/String;

    move-result-object v0

    const-string v1, "android.intent.action.BATTERY_CHANGED"

    invoke-virtual {v0, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-eqz v0, :cond_0

    const-string v0, "level"

    invoke-virtual {p2, v0, v6}, Landroid/content/Intent;->getIntExtra(Ljava/lang/String;I)I

    move-result v0

    if-nez v0, :cond_1

    iget-object v1, p0, Lcom/estrongs/android/taskmanager/c;->a:Lcom/estrongs/android/taskmanager/b;

    invoke-static {v1}, Lcom/estrongs/android/taskmanager/b;->a(Lcom/estrongs/android/taskmanager/b;)Landroid/widget/TextView;

    move-result-object v1

    iget-object v2, p0, Lcom/estrongs/android/taskmanager/c;->a:Lcom/estrongs/android/taskmanager/b;

    invoke-virtual {v2, v3}, Lcom/estrongs/android/taskmanager/b;->getString(I)Ljava/lang/String;

    move-result-object v2

    new-array v3, v7, [Ljava/lang/Object;

    const-string v4, "0%"

    aput-object v4, v3, v6

    invoke-static {v2, v3}, Ljava/text/MessageFormat;->format(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v1, v2}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    :goto_0
    iget-object v1, p0, Lcom/estrongs/android/taskmanager/c;->a:Lcom/estrongs/android/taskmanager/b;

    invoke-static {v1}, Lcom/estrongs/android/taskmanager/b;->b(Lcom/estrongs/android/taskmanager/b;)Landroid/widget/ProgressBar;

    move-result-object v1

    invoke-virtual {v1, v0}, Landroid/widget/ProgressBar;->setProgress(I)V

    iget-object v0, p0, Lcom/estrongs/android/taskmanager/c;->a:Lcom/estrongs/android/taskmanager/b;

    invoke-static {v0}, Lcom/estrongs/android/taskmanager/b;->c(Lcom/estrongs/android/taskmanager/b;)Landroid/widget/TextView;

    move-result-object v0

    iget-object v1, p0, Lcom/estrongs/android/taskmanager/c;->a:Lcom/estrongs/android/taskmanager/b;

    const v2, 0x7f070042

    invoke-virtual {v1, v2}, Lcom/estrongs/android/taskmanager/b;->getString(I)Ljava/lang/String;

    move-result-object v1

    new-array v2, v7, [Ljava/lang/Object;

    iget-object v3, p0, Lcom/estrongs/android/taskmanager/c;->a:Lcom/estrongs/android/taskmanager/b;

    const-string v4, "temperature"

    invoke-virtual {p2, v4, v6}, Landroid/content/Intent;->getIntExtra(Ljava/lang/String;I)I

    move-result v4

    invoke-static {v3, v4}, Lcom/estrongs/android/taskmanager/b;->a(Lcom/estrongs/android/taskmanager/b;I)Ljava/lang/String;

    move-result-object v3

    aput-object v3, v2, v6

    invoke-static {v1, v2}, Ljava/text/MessageFormat;->format(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    :cond_0
    return-void

    :cond_1
    const/16 v1, 0x64

    if-ne v0, v1, :cond_2

    iget-object v1, p0, Lcom/estrongs/android/taskmanager/c;->a:Lcom/estrongs/android/taskmanager/b;

    invoke-static {v1}, Lcom/estrongs/android/taskmanager/b;->a(Lcom/estrongs/android/taskmanager/b;)Landroid/widget/TextView;

    move-result-object v1

    iget-object v2, p0, Lcom/estrongs/android/taskmanager/c;->a:Lcom/estrongs/android/taskmanager/b;

    invoke-virtual {v2, v3}, Lcom/estrongs/android/taskmanager/b;->getString(I)Ljava/lang/String;

    move-result-object v2

    new-array v3, v7, [Ljava/lang/Object;

    const-string v4, "100%"

    aput-object v4, v3, v6

    invoke-static {v2, v3}, Ljava/text/MessageFormat;->format(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v1, v2}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    goto :goto_0

    :cond_2
    iget-object v1, p0, Lcom/estrongs/android/taskmanager/c;->a:Lcom/estrongs/android/taskmanager/b;

    invoke-static {v1}, Lcom/estrongs/android/taskmanager/b;->a(Lcom/estrongs/android/taskmanager/b;)Landroid/widget/TextView;

    move-result-object v1

    iget-object v2, p0, Lcom/estrongs/android/taskmanager/c;->a:Lcom/estrongs/android/taskmanager/b;

    invoke-virtual {v2, v3}, Lcom/estrongs/android/taskmanager/b;->getString(I)Ljava/lang/String;

    move-result-object v2

    new-array v3, v7, [Ljava/lang/Object;

    new-instance v4, Ljava/lang/StringBuilder;

    invoke-direct {v4}, Ljava/lang/StringBuilder;-><init>()V

    rem-int/lit8 v5, v0, 0x64

    invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v4

    const-string v5, "%"

    invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v4

    invoke-virtual {v4}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v4

    aput-object v4, v3, v6

    invoke-static {v2, v3}, Ljava/text/MessageFormat;->format(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v1, v2}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    goto :goto_0
.end method
